package com.github.soiff.shadow.error;

import java.io.Serializable;

/**
 * Created by Soiff on 2016/05/20.
 *
 * @author : Soiff
 */
public enum Errors implements Serializable {
    OK,
    FAIL(false),
    FAIL_ALREADY_EXIST(false, "Already Exist");

    public final boolean v;
    public final String msg;
    Errors() {
        this.v = true;
        this.msg = "";
    }
    Errors(final boolean v) {
        this.v = v;
        this.msg = "";
    }
    Errors(final boolean v, final String msg) {
        this.v = v;
        this.msg = msg;
    }

    public static Errors valueOf (boolean v) {
        return v ? OK : FAIL;
    }
}
